package com.pubinfo.passbook.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.pubinfo.passbook.common.entity.TFileInfo;
import com.pubinfo.passbook.common.entity.TSourceArtificial;
import com.pubinfo.passbook.common.model.dto.MDM.TSourceArtificialParam;
import com.pubinfo.passbook.common.model.dto.file.FileInfoParam;
import com.pubinfo.passbook.common.model.dto.file.FileListParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.tomcat.jni.FileInfo;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author xuhong
 * @since 2021-11-23
 */
public interface TFileInfoMapper extends BaseMapper<TFileInfo> {
  
  IPage<TFileInfo> selectFileInfoByFileListParam(IPage<TFileInfo> page, @Param("param") FileListParam param);
  
  List<TFileInfo> selectByArtificialId(String id);

  List<TFileInfo> selectByFPKEY(String id);

  List<TFileInfo> selectByInvoiceId(String id);

  List<TFileInfo> selectByPassbookId(String id);

  Boolean softDeleteFile( @Param("id") List<String> id);

  List<TFileInfo> selectFileByWiteoffId(String id);

  List<TFileInfo> selectEnclosureByWiteoffId(String id);

  List<TFileInfo> selectByInvoiceIdTFileInfos(String id);

  List<TFileInfo> selectArtificialFIleById(String id);

  List<TFileInfo> selectNeedUploadFtp();

  FileInfoParam selectFileInfoParam(String id);

  String selectFileIdByFpdmAndFphm( @Param("fpdm")String fpdm, @Param("fphm")String fphm);

  String selectPassbookFileIdByInvoice( @Param("fpdm")String fpdm, @Param("fphm")String fphm);

  TFileInfo selectFileIdByInvoiceId(String invoiceId);
}
